package com.zxc.ompz;

import net.rim.device.api.io.URI;
import net.rim.device.api.util.Persistable;

public class Media implements Persistable{
	private String url;
	private String type;
	private String name;
	private long length;
	private boolean local;
	public Media(String url){
		this.url = url;
		this.name = URI.getFile(url);
		local = false;
	}
	public String toString(){
		return name;
	}
	public String getName(){
		return name;
	}
	public String getUrl(){
		return url;
	}
	public long getLength(){
		return length;
	}
	public String getType(){
		return type;
	}
	public void setUrl(String url){
		this.url = url;
	}
	public void setLocal(boolean local){
		this.local = local;
	}
	public void setType(String type){
		this.type = type;
	}
	public void setLength(long length){
		this.length = length;
	}
	public boolean isLocal(){
		return local;
	}
	public boolean equals(Media media){
		return url.equals(media.getUrl());
	}
}

